<template>
	<view class="mineContainer">
		<view class="headerBg">
			<image src="../../static/img/mine_bg.png" class="headerImg"></image>
			<view class="headerText"><view class="title f fc">我的</view></view>
			<!--头像-->
			<view class="headerCont ">
				<view class="f fb">
					<view class="f ">
						<image src="../../static/img/avatar.png" mode="" class="tx"></image>
						<view class="txright">
							<view class="name">赵信</view>
							<view class="gs">北京科技文化有限公司</view>
						</view>
					</view>
					<view class="exit f fc" @click="loginOut">
						<text class="cuIcon-exit"></text>
						退出
					</view>
				</view>
			</view>
			<!--提示信息-->
			<view class="tip f fs">
				<text class="cuIcon-infofill"></text>
				提示信息
			</view>
			<!--我的任务-->
			<view class="workCont">
				<view class="title f fb" @click="toApproval(0)">
					我的任务
					<text class="cuIcon-right"></text>
				</view>
				<view class="pad20">
					<view class="cont f fa">
						<view class="nowork " @click="toApproval(0)">
							<image src="../../static/img/governance_tab3.png" mode=""></image>
							<view>
								待审批
								<text class="bagde">10</text>
							</view>
						</view>
						<view class="borderb"></view>
						<view class="nowork" @click="toApproval(1)">
							<image src="../../static/img/governance_tab4.png" mode=""></image>
							<view>
								已审批
								<text class="bagde">10</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!--单个item-->
		<view class="itemCont">
			<view class="title f fb" @click="toMessage">
				<image src="../../static/img/set4.png" mode="" class="img"></image>
				<view class="f fl fb itemright">
					消息通知
					<text class="cuIcon-right"></text>
				</view>
			</view>
			<view class="title f fb" @click="toCompany">
				<image src="../../static/img/set3.png" mode="" class="img"></image>
				<view class="f fl fb itemright">
					企业信息
					<text class="cuIcon-right"></text>
				</view>
			</view>
			<view class="title f fb" @click="toConstract">
				<image src="../../static/img/set1.png" mode="" class="img"></image>
				<view class="f fl fb itemright">
					合同信息
					<text class="cuIcon-right"></text>
				</view>
			</view>
			<view class="title f fb" @click="toAppoint()">
				<image src="../../static/img/set5.png" mode="" class="img"></image>
				<view class="f fl fb itemright">
					我的预约
					<text class="cuIcon-right"></text>
				</view>
			</view>
			<view class="title f fb" @click="toUserset">
				<image src="../../static/img/set2.png" mode="" class="img"></image>
				<view class="f fl fb itemright noBord">
					用户设置
					<text class="cuIcon-right"></text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { mapMutations } from 'vuex';
export default {
	data() {
		return {
			h: this.$h,
			userInfo: uni.getStorageSync('userInfo')
		};
	},
	methods: {
		//退出
		...mapMutations(['logout', 'setApproval']),
		loginOut() {
			this.logout();
			uni.navigateTo({ url: '/pages/login/login' });
		},
		//我的任务
		toApproval(type) {
			var than = this;
			than.setApproval(type);
			uni.switchTab({
				url: '../approval/index'
			});
		},
		//消息中心
		toMessage() {
			uni.switchTab({
				url: '../message/index'
			});
		},
		//企业信息
		toCompany() {
			uni.navigateTo({ url: '../../views/mine/companyInfo' });
		},
		//合同信息
		toConstract() {
			uni.navigateTo({ url: '../../views/mine/contractInfo' });
		},
		//我的预约
		toAppoint() {
			uni.navigateTo({ url: '../../views/message/appointTab' });
		},
		//用户设置
		toUserset() {
			uni.navigateTo({
				url: '../../views/mine/userSet'
			});
		}
	}
};
</script>

<style lang="scss" scoped>
@import '@/common/style/mine.scss';
</style>
